<#compress>
    <#assign actionname>${(action=='create')?string('新建','编辑')}</#assign>
    <@override name="title">${actionname}楼层</@override>
    <@override name="viewbody">
    <div class="row">
        <div class="col-md-12">
            <h3 class="page-title">
            ${actionname}业态
                <small>${actionname}业态.</small>
            </h3>
            <ul class="page-breadcrumb breadcrumb">
                <li>
                    <i class="fa fa-home"></i>
                    <a href="${ctx}/admin/home">
                        首页
                    </a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <a href="${ctx}/admin/format">
                        业态管理
                    </a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <a href="#">
                    ${actionname}楼层
                    </a>
                </li>
            </ul>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-heading"><h6 class="panel-title">业态信息</h6></div>
        <div class="panel-body">
            <form class="form-horizontal" action="${ctx}/admin/format/save" role="form" id="formatForm" method="post">
                <input name="format.id" type="hidden" value="${format.id!}"/>

                <div class="alert alert-danger display-hide">
                    <button class="close" data-close="alert"></button>
                    温馨提示：请输入正确的业态信息！
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="formatName">业态名称: <span class="required">*</span></label>

                    <div class="col-sm-10">
                        <input type="text" class="required form-control input-large" placeholder="业态名称"
                               name="brandFormat.name" id="formatName" value="${format.name!}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="description">业态描述:</label>

                    <div class="col-sm-10">
                        <textarea rows="5" cols="5" id="description" class="limited form-control"
                                  name="brandFormat.description"
                                  placeholder="请输入业态描述">${format.desciption!}</textarea>
                        <span class="help-block" id="limit-text">最多120个字符.</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="parent">上级业态: </label>

                    <div class="col-sm-10">
                        <select data-placeholder="选择上级" id="parent" name="brandFormat.parent"
                                class="form-control input-large select2me" <#if format.rank?? && format.rank == 1>disabled="disabled" </#if>>
                            <option value=""></option>
                            <#if parentlist??>
                                <#list parentlist as mb>
                                    <option value="${mb.id}"
                                            <#if format.parent?? && format.parent == mb.id>selected="selected"</#if> >${mb.name}</option>
                                </#list>
                            </#if>
                        </select>
                    </div>
                </div>


                <div class="form-actions text-right">

                    <a class="btn default yellow-stripe" href="${ctx}/admin/format"><i class="fa fa-arrow-circle-o-left"></i> 返回</a>
                    <input type="submit" value="保存" class="btn btn-primary">
                </div>
            </form>
        </div>

    </div>
    </@override>

    <@override name="viewmodule">format_item</@override>
    <@extends name="../_basic/main.ftl"></@extends>
</#compress>